﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EzDesk.DevHelper.EzMLGenerator
{
    public class LanguageBasicInfoProcessor : EzMLProcessor
    {
        string _sectionName;

        public LanguageBasicInfoProcessor(string sectionName)
        {
            this._sectionName = sectionName;
        }

        public override string Process(string input)
        {
            string prefix = string.Format(
                "<ez:root xmlns:ez=\"http://www.codeplex.com/ezdeskdev\"  section=\"{0}\">",
                _sectionName
                );
            string suffix = "</ez:root>";

            var output = input;
            output = output.Remove(0, prefix.Length);
            output = output.Remove(output.Length - suffix.Length, suffix.Length);

            return output;


        }
    }
}
